#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "OLED.h"
#include "PWM.h"

uint8_t i = 0;

int main(void)
{
	OLED_Init();
	PWM_Init();
	OLED_ShowString(1, 1, "Lightness:");
	while (1)
	{
		for (i = 0; i < 70; i++)
		{
			PWM_CCRSet(i);
			Delay_ms(12);
			OLED_ShowNum(1, 11, i, 3);
		}
		for (i = 70; i > 1; i--)
		{
			PWM_CCRSet(i);
			Delay_ms(12);
			OLED_ShowNum(1, 11, i, 3);
		}
	}
}
